<% layout('/layouts/default.html', {title: '考核任务指标表-指标信息管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${dcSupExamQuotaInfo}" action="${ctx}/quota/dcSupExamQuotaInfo/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('考核年度')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:hidden path="isNewRecord"/>
								<#form:hidden path="id" />
								<#form:select path="examYear" readonly="true" items="${yearList}" blankOption="true" data-placeholder="请选择" itemLabel="yearLabel" itemValue="yearValue" class="form-control width-120" defaultValue="${currentYear}"/>

								<#form:hidden path="QuotaId" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('指标类别')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="quotaType" dictType="dc_quotaType" blankOption="true"  data-placeholder="请选择" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<% if(dcSupExamQuotaInfo.quotaGroup == '2'){ %>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('指标分类')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="quotaClass" dictType="dc_quota_class" blankOption="true"  data-placeholder="请选择" class="form-control " defaultValue="1"/>
							</div>
						</div>
					</div>
				</div>
				<% } %>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('序号')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="sortNum" class="form-control digits" maxlength="4"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('目标内容')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="quotaContent" rows="4" maxlength="255" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('单位')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="quotaUnit" maxlength="255" class="form-control "/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required ">*</span> ${text('被考核单位')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-2">
								<#form:treeselect  title="${text('被考核单位')}"
								path="exameOrgs" labelValue="${officeName!}" labelPath="exameOrgNames"
								url="${ctx}/sys/office/treeData" type="text"
								class="required" isReturnValue="false" allowClear="true" canSelectRoot="true" canSelectParent="true"
								returnFullName="false" checkbox="true" chkboxType="{'Y':'','N':''}"
								placeholder="请选择被考核单位"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('权数')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="quotaWeight" class="form-control digits required" maxlength="3"/>
							</div>
						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('本年度目标')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="currentYaerGoal" maxlength="255" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('上一年度目标任务')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="lastYaerGoal" maxlength="255" class="form-control "/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('上一年度完成情况')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="lastYearComplete" maxlength="255" class="form-control "/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('备注')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="remarks" rows="4" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
<!--				<div class="row">-->
<!--					<div class="col-xs-6">-->
<!--						<div class="form-group">-->
<!--							<label class="control-label col-sm-4" title="">-->
<!--								<span class="required hide">*</span> ${text('上一年度目标任务')}：<i class="fa icon-question hide"></i></label>-->
<!--							<div class="col-sm-8">-->
<!--								<#form:input path="lastYaerGoal" maxlength="255" class="form-control"/>-->
<!--							</div>-->
<!--						</div>-->
<!--					</div>-->
<!--				</div>-->

<!--				<div class="row">-->
<!--					<div class="col-xs-6">-->
<!--						<div class="form-group">-->
<!--							<label class="control-label col-sm-4" title="">-->
<!--								<span class="required hide">*</span> ${text('上一年度完成情况')}：<i class="fa icon-question hide"></i></label>-->
<!--							<div class="col-sm-8">-->
<!--								<#form:input path="lastYearComplete" maxlength="255" class="form-control"/>-->
<!--							</div>-->
<!--						</div>-->
<!--					</div>-->
<!--				</div>-->

<!--				<div class="row">-->
<!--					<div class="col-xs-6">-->
<!--						<div class="form-group">-->
<!--							<label class="control-label col-sm-4" title="">-->
<!--								<span class="required hide">*</span> ${text('是否补充细则')}：<i class="fa icon-question hide"></i></label>-->
<!--							<div class="col-sm-8">-->
<!--								<#form:input path="fileFlag" maxlength="10" class="form-control"/>-->
<!--							</div>-->
<!--						</div>-->
<!--					</div>-->

				</div>


<!--				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2">
								<span class="required hide">*</span> ${text('附件上传')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadFile" bizKey="${dcSupExamQuotaInfo.id!}" bizType="dcSupExamQuotaInfo_file"
									uploadType="all" class="" readonly="false" preview="true"/>
							</div>
						</div>
					</div>
				</div>
			</div>-->
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if(dcSupExamQuotaInfo.id == null){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('提 交')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>